package com.zhang.springcloud.controller;

import com.zhang.springcloud.domain.CommonResult;
import com.zhang.springcloud.service.StorageService;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class StorageController {
    @Resource
    StorageService ss;
    @PostMapping("/storage/decrease")
    public CommonResult descrse(Long product_id,Integer count){
        ss.decrease(product_id,count);
        return new CommonResult(200,"库存扣减成功",null);
    }
}
